<option value=""></option>
<?php foreach ($pupils as $key => $pupil): ?>
    <option value="<?php echo $key; ?>"><?php echo $pupil; ?></option>
<?php endforeach; ?>